package com.haoe.service;

import com.haoe.entity.Order;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: 80305082
 * @Date: 2021/3/15
 * @Description: 订单service
 */
public interface OrderService {

    List<Order> selectByCustomerId(Long customerId);

    @Transactional(rollbackFor = Exception.class)
    Long saveOrder(Order order);

    Order selectById(Long id);

    @Transactional(rollbackFor = Exception.class)
    void updateOrder(Long id, Integer status);

    Order selectByKeys(Long customerId, Long restaurantId, int status);

    List<Order> selectByOrderStatus(Long id, int status);

    List<Order> selectByRestaurantIdAndStatus(Long restaurantId, List<Integer> statusList);

    List<Order> selectByCustomerIdAndRestaurantId(Long customerId, Long restaurantId);
}
